<?php

class newsletterComponents extends sfComponents
{
    public function executeNews_items()
    {
        if( $this->getRequestParameter('id') )
        {
            $newsletter = NewsletterPeer::retrieveByPk($this->getRequestParameter('id'));
            $this->newsletter = $newsletter;
        }
        $this->news = NewsPeer::doSelect(new Criteria());
    }

}
